package com.sd.chat;

import java.io.Serializable;
import java.util.Vector;

public class ServerData implements Serializable {

    private Vector<Utilizador> users;
    private Vector<Post> posts;
    private Vector<Post> delayedposts;
    private Vector<Comment> comments;
    private Vector<Message> pms;
    private int userID;
    private int postID;
    private int comentID;
    private int pmID;

    public ServerData() {
        users = new Vector<Utilizador>();
        posts = new Vector<Post>();
        comments = new Vector<Comment>();
        pms = new Vector<Message>();
        delayedposts = new Vector<Post>();
        userID = 0;
        postID = 0;
        comentID = 0;
        pmID = 0;
    }

    public ServerData(Vector<Utilizador> users, Vector<Post> posts, Vector<Comment> comments, Vector<Message> pms, Vector<Post> delayedP) {
        this.users = users;
        this.posts = posts;
        this.comments = comments;
        this.pms = pms;
        this.delayedposts = delayedP;
        userID = 0;
        postID = 0;
        comentID = 0;
        pmID = 0;
    }

    public ServerData(Vector<Utilizador> users, Vector<Post> posts, Vector<Comment> comments, Vector<Message> pms, Vector<Post> delayedP, int userID, int postID, int comentID, int pmID) {
        this.users = users;
        this.posts = posts;
        this.comments = comments;
        this.pms = pms;
        this.delayedposts = delayedP;
        this.userID = userID;
        this.postID = postID;
        this.comentID = comentID;
        this.pmID = pmID;
    }

    public int getComentID() {
        return comentID;
    }

    public void setComentID(int comentID) {
        this.comentID = comentID;
    }

    public int getPmID() {
        return pmID;
    }

    public void setPmID(int pmID) {
        this.pmID = pmID;
    }

    public int getPostID() {
        return postID;
    }

    public void setPostID(int postID) {
        this.postID = postID;
    }

    public int getUserID() {
        return userID;
    }

    public void setUserID(int userID) {
        this.userID = userID;
    }

    public Vector<Post> getDelayedposts() {
        return delayedposts;
    }

    public void setDelayedposts(Vector<Post> delayedposts) {
        this.delayedposts = delayedposts;
    }
    
    

    public Vector<Comment> getComments() {
        return comments;
    }

    public void setComments(Vector<Comment> comments) {
        this.comments = comments;
    }

    public Vector<Message> getPms() {
        return pms;
    }

    public void setPms(Vector<Message> pms) {
        this.pms = pms;
    }

    public Vector<Post> getPosts() {
        return posts;
    }

    public void setPosts(Vector<Post> posts) {
        this.posts = posts;
    }

    public Vector<Utilizador> getUsers() {
        return users;
    }

    public void setUsers(Vector<Utilizador> users) {
        this.users = users;
    }

    @Override
    public String toString() {
        return "ServerData{" + "users=" + users.size() + ", posts=" + posts.size() + ", comments=" + comments.size() + ", pms=" + pms.size() + '}';
    }
}
